package pers.warren.ai.oneapi.proxy;


import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.reactivestreams.Publisher;
import org.springframework.ai.chat.prompt.ChatOptions;
import org.springframework.ai.chat.prompt.Prompt;
import org.springframework.ai.openai.OpenAiChatModel;
import org.springframework.ai.openai.OpenAiChatOptions;
import org.springframework.ai.openai.api.OpenAiApi;
import org.springframework.stereotype.Service;
import pers.warren.ai.oneapi.OneApiProxy;
import pers.warren.ai.oneapi.bean.Model;
import pers.warren.ai.oneapi.bean.Token;
import pers.warren.ai.oneapi.config.OneApiConfiguration;

import java.util.List;
import java.util.Map;


@Slf4j
@Service
@RequiredArgsConstructor
public class OneApiProxyImpl implements OneApiProxy {

    private final OneApiConfiguration oneApiConfiguration;




    @Override
    public Model getModelByName(String modelName) {
        return null;
    }

    @Override
    public Map<String, Model> getModelMap() {
        return null;
    }

    @Override
    public String getKey(String modelName) {
        return null;
    }

    @Override
    public List<Token> getKeys() {
        return null;
    }

    @Override
    public Publisher<String> chatCompletions(Prompt prompt) {
        OpenAiChatOptions options = (OpenAiChatOptions)prompt.getOptions();
        OpenAiApi.ChatCompletionRequest.StreamOptions streamOptions = options.getStreamOptions();

        return null;
    }


}
